home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Graphics / PerfectPaint / rexx / Anim / MotionBlur.rx < prev    next >
Encoding:
Text File  |  2001-04-16  |  978 b   |  76 lines

  1. /*     arexx Script */
  2.  
  3.     options results
  4.     parse ARG Port b
  5.     
  6.     ADDRESS value Port
  7.  
  8.     pp_GetDepth
  9.     D=result
  10.     IF D<24 then DO
  11.         pp_Warn 'This*script*is*only|for*24bits*Picture.'    
  12.         pp_PermitRefresh
  13.         Exit
  14.     END
  15.  
  16.     pp_GetWidth
  17.     w=result
  18.     pp_GetHeight
  19.     h=result
  20.  
  21.     pp_CountFrames
  22.     count=result
  23.     IF count<2 then DO
  24.         pp_Warn 'Make*an*Anim*first.'
  25.         pp_PermitRefresh
  26.         EXIT
  27.     END
  28.  
  29.     depth=5
  30.     pp_DialogInit 150 60 "*Motion*Blur*" 1
  31.         pp_Integer 0 70 8 50 16 "Depth" 1 depth
  32.     pp_Dialog
  33.     rc=result
  34.     IF rc=0 then DO
  35.         EXIT
  36.     END        
  37.  
  38.     pp_GetDialog 0
  39.     depth=result
  40.  
  41.  
  42.     pp_GetCurrentBrush
  43.     CB=result
  44.     pp_FindEmptyBrush
  45.     Brush=result
  46.     pp_SetBrush Brush
  47.  
  48.     do i=1 to count
  49.         j=i-depth
  50.         if j<1 then DO
  51.             j=1
  52.         end
  53.         if j<i then do
  54.             pp_gotoframe j
  55.             pp_picttospare
  56.             do jj=j+1 to i
  57.                 pp_Gotoframe jj
  58.                 pp_Pickbrush 0 0 w h
  59.                 pp_Spareonoff
  60.                 pp_brushopacity 50
  61.                 pp_plot w/2 h/2
  62.             end
  63.             pp_gotoframe i
  64.             pp_SparetoPict
  65.         end
  66.     end
  67.  
  68.     pp_BrushOpacity 100
  69.     pp_FreeBrush
  70.     pp_SetBrush CB
  71.  
  72. EXIT
  73.  
  74.  
  75.  
  76.